<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1" />

<link rel="stylesheet"
	href="<%=path%>/console/plugin/term/bootstrap.min.css">
<link rel="stylesheet" href="<%=path%>/console/plugin/term/style.css">
<script src="<%=path%>/console/plugin/term/jquery-2.1.4.min.js"></script>
<script src="<%=path%>/console/plugin/term/bootstrap.min.js"></script>
<script src="<%=path%>/console/plugin/term/ajaxfileupload.js"></script>

<!--[if lt IE 9]>
	  <script src="http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
	  <script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
<title>SftpWindow</title>
</head>
<body>
	<input type="hidden" id="mid" value="1222" />
	<input type="hidden" id="path" value="<%=basePath%>" />
	<div class="wrapper">
		<div class="container">
			<div class="col-md-9">
				<div class="panel panel-warning">
					<div class="panel-heading">
						<label class="panel-title pull-left" style="margin-top: 5px"
							id="catalog"></label>
						<button
							class="btn btn-sm btn-success col-md-2 col-sm-3 pull-right"
							id="subCreate">Create fodder</button>
						<div class="col-md-2 pull-right">
							<input class="form-control input-sm" type="text" id="fName" />
						</div>
						<label class="control-label pull-right" for="fName"
							style="margin-top: 5px">Fodder name</label> <span
							class="clearfix"></span>
					</div>
					<div class="panel-body"
						style="height: 500px; padding: 0; overflow: scroll">
						<table class="table table-striped  table-responsive table-hover">
							<thead>
								<tr>
									<th>Remote Name</th>
									<th>Size</th>
									<th>Modified</th>
									<th>Attributes</th>
									<th>Action</th>
								</tr>
							</thead>
							<tbody id="file-list">
							</tbody>
						</table>
					</div>
				</div>


				<div class="progress progress-striped active"
					style="margin-bottom: 10px">
					<div class="progress-bar progress-bar-info" role="progressbar"
						aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
						style="width: 0%;">
						<span id="percent">00.00%</span>
					</div>
				</div>
				<div class="form-group">


					<div class="form-group">
						<label for="file">上传文件</label> <input type="file"
							name="uploadFile" id="fileToUpload" /> <span id="state"
							style="color: red">current percent:00.00%</span>
					</div>
					<button class="btn btn-sm btn-success col-md-1 col-sm-3"
						id="subFile">上传</button>
				</div>

			</div>

		</div>


		<div class="modal fade" id="removeModal" tabindex="-1" role="dialog"
			aria-labelledby="removeModalLabel" aria-hidden="true"
			data-backdrop="static">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="removeModalLabel"></h4>
					</div>
					<div class="modal-body">是否删除?</div>
					<div class="modal-footer">
						<button id="subRemove" type="button" class="btn btn-primary"
							data-dismiss="modal">确定</button>
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>
			</div>
		</div>


		<!-- attributes model begin -->
		<div class="modal fade" id="attrModal" tabindex="-1" role="dialog"
			aria-labelledby="attrModalLabel" aria-hidden="true"
			data-backdrop="static">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="attrModalLabel"></h4>
					</div>
					<div class="modal-body text-center">
						<table class="table" style="margin-bottom: 0">
							<thead>
								<tr>
									<th class="text-center">Permissions</th>
									<th class="text-center">Read</th>
									<th class="text-center">Write</th>
									<th class="text-center">Execute</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>Owner</td>
									<td><input type="checkbox" id="usrR" value="400" /></td>
									<td><input type="checkbox" id="usrW" value="200" /></td>
									<td><input type="checkbox" id="usrE" value="100" /></td>
								</tr>
								<tr>
									<td>Group</td>
									<td><input type="checkbox" id="grpR" value="40" /></td>
									<td><input type="checkbox" id="grpW" value="20" /></td>
									<td><input type="checkbox" id="grpE" value="10" /></td>
								</tr>
								<tr>
									<td>Other</td>
									<td><input type="checkbox" id="othR" value="4" /></td>
									<td><input type="checkbox" id="othW" value="2" /></td>
									<td><input type="checkbox" id="othE" value="1" /></td>
								</tr>
								<tr>
									<td>Permission</td>
									<td colspan="3"><input class="form-control input-sm"
										type="text" id="permissions" name="permissions" /></td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="modal-footer">
						<button id="subAttr" type="button" class="btn btn-primary"
							data-dismiss="modal" onclick="">Submit</button>
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					</div>
				</div>
			</div>
		</div>
</body>
<script type="text/javascript"
	src="<%=path%>/console/views/om/machine/sftp.js?t=<%=new Date().getTime() %>"></script>
</html>
